/**      
 * @file		circle2.cpp
 * @description		This example demonstrates why we create a public
 *			interface (the member functions that programmers can 
 *			call, they can't access the private data members)
 *			From the circle example we stored the radius as a
 *			double, however, here I've changed it to an int.
 *			This doesn't affect the programmers that have already
 *			used my class because I gave them a public interface,
 *			they have to use that to access the circle's data.
 *			They don't see how I'm storing the data internally.
 * @course		CSCI 123 Section 00000
 * @assignment 
 * @date		mm/dd/yyyy
 * @author		Brad Rippe (00000000) brippe@fullcoll.edu
 * @version		1.0
 */
#include <iostream>
using namespace std;

// CONSTANT VARS
const double PIE = 3.14159;

/**
 * Contains information about a circle
 */
class Circle {
public:
	/**
	 * Gets the circles radius
	 * @return the circle's radius
	 */
	double getRadius();

	/**
	 * Sets the circle's radius
	 * @param aRadius the circle's radius
	 */
	void setRadius(double aRadius);

	/**
	 * Gets the circles area
	 * Area of a circle is r^2*PIE
	 * @return the circle's area
	 */
	double getArea();

	// the private modifier restricts access to the 
	// member variable(s)
	// information hiding
private:
	int mRadius;	// I've change the internal data from double to int
};

/**
 * @return zero if the application executes successfully
 */
int main() {
	Circle circle;
	Circle circle2;

	circle.setRadius(10);
	cout << "Circle's radius is " << circle.getRadius() << endl;
	cout << "Circle's area is " << circle.getArea() << endl;

	circle2.setRadius(25);
	cout << "Circle2's radius is " << circle2.getRadius() << endl;
	cout << "Circle2's area is " << circle2.getArea() << endl;
	return 0;
}

void Circle::setRadius(double aRadius) {
	mRadius = static_cast<int>(aRadius);
}

double Circle::getRadius() {
	return mRadius;	
}

double Circle::getArea() {
	return mRadius*mRadius*PIE;
}

